package view.cursada;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.AbstractListModel;
import javax.swing.BoxLayout;
import javax.swing.JDialog;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.JLabel;

public class VerAsistencias extends JDialog {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JTable tableAlumnos;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					VerAsistencias window = new VerAsistencias();
					window.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the panel.
	 */
	public VerAsistencias() {
		setBounds(100, 100, 600, 477);
		setLocationRelativeTo(null);
		getContentPane().setLayout(new BorderLayout(0, 0));

		JPanel panel_2 = new JPanel();
		getContentPane().add(panel_2);
		panel_2.setLayout(new BoxLayout(panel_2, BoxLayout.X_AXIS));

		JPanel panel_1 = new JPanel();
		panel_2.add(panel_1);
		panel_1.setLayout(null);

		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(194, 39, 267, 174);
		panel_1.add(scrollPane);

		tableAlumnos = new JTable();
		tableAlumnos.setModel(new DefaultTableModel(new Object[][] { { "98656464", "fasas" }, }, new String[] { "DNI", "Alumno" }));
		tableAlumnos.getColumnModel().getColumn(0).setPreferredWidth(60);
		tableAlumnos.getColumnModel().getColumn(1).setPreferredWidth(80);
		scrollPane.setViewportView(tableAlumnos);

		JList<Object> listClases = new JList<Object>();
		listClases.setBounds(59, 63, 114, 174);
		listClases.setModel(new AbstractListModel<Object>() {
			private static final long serialVersionUID = 1L;
			String[] values = new String[] { "lunes 10 a 12", "miercoles 10 a 12" };

			public int getSize() {
				return values.length;
			}

			public Object getElementAt(int index) {
				return values[index];
			}
		});
		panel_1.add(listClases);

		JLabel lblClases = new JLabel("Clases: ");
		lblClases.setBounds(59, 38, 46, 14);
		panel_1.add(lblClases);

		JLabel lblAlumnos = new JLabel("Alumnos: ");
		lblAlumnos.setBounds(194, 11, 81, 14);
		panel_1.add(lblAlumnos);

		JPanel panel_3 = new JPanel();
		getContentPane().add(panel_3, BorderLayout.NORTH);

		JPanel panel_4 = new JPanel();
		getContentPane().add(panel_4, BorderLayout.WEST);

	}

}
